#include "TeleOpCommand.h"

TeleOpCommand::TeleOpCommand() {
	// Use requires() here to declare subsystem dependencies
	// eg. requires(chassis);
	Requires(CommandBase::drivetrain);
}

// Called just before this Command runs the first time
void TeleOpCommand::Initialize() {
	
}

// Called repeatedly when this Command is scheduled to run
void TeleOpCommand::Execute() {
	CommandBase::drivetrain->DriveRobot((CommandBase::oi->driverJoystick.GetRawAxis(1)) , (1.0)*(CommandBase::oi->driverJoystick.GetRawAxis(3)));
}

// Make this return true when this Command no longer needs to run execute()
bool TeleOpCommand::IsFinished() {
	return false;
}

// Called once after isFinished returns true
void TeleOpCommand::End() {
	
}

// Called when another command which requires one or more of the same
// subsystems is scheduled to run
void TeleOpCommand::Interrupted() {
	CommandBase::drivetrain->DriveRobot(0.0, 0.0);
}
